package com.jl.card.parse.part;

import com.jl.card.parse.IAPDUComponent;
import com.jl.card.parse.part.p1p2.APDUParem;
import com.jl.util.HexUtil;

public class P1P2Part extends APDUPart{

	private static final String SEP = "|";
	private String res = "";
	public P1P2Part(IAPDUComponent parent, byte[] part) {
		super(parent, part);
		analyse();
	}

	@Override
	public String getSummary() {
		return "P1P2 :" + HexUtil.toHexCompact(part) + '[' + res + ']';
	}

	@Override
	public void analyse() {
		byte ins = ((APDUComponentManager)getParent()).getIns();
		byte p1 = part[0];
		byte p2 = part[1];
		this.res =  new APDUParem(ins, p1, p2).getSummary();
	}

}
